﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台--文章管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>images/style.css" />
    <base target="_self"/>

    <script src='<?php echo isset($skin)?$skin:"";?>js/jquery.min.js'></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/dist/dialog-min.js"></script>
    <script src="<?php echo isset($skin)?$skin:"";?>js/admin.js"></script>
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
        });
        //-->
    </script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>/js/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate-plugin.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artDialog.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/iframeTools.js"></script>
<link rel="stylesheet" href="<?php echo isset($skin)?$skin:"";?>js/artdialog.css" type="text/css">
</head>
<body>
<div class="hh6"></div>
<script charset="utf-8" src="../kedit/kindeditor-min.js"></script>
<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {width:'90%',height:'300px',uploadJson: 'kdupload.php?yeslitpic=1'});
		//给按钮添加click事件
		K('#faddim').click(function() {
			editor.loadPlugin('image', function() {
				//图片弹窗的基本参数配置
				editor.plugin.imageDialog({
					
					showRemote: false, //网络图片不开启
					imageUrl: K('#img').val(), //如果图片路径框内有内容直接赋值于弹出框的图片地址文本框
					//点击弹窗内”确定“按钮所执行的逻辑
					clickFn: function(url, title, width, height, border, align) {
						K('#img').val(url);//获取图片地址
						editor.hideDialog(); //隐藏弹窗
					}
				});
			});
		});
	});
	$(function(){
		$("#danye").click(function(){
			$("#con").show("slow");
		});
		$("#set").click(function(){
			$(".hidden").show("slow");
		});
	});
</script>

<form action="?c=arctype&a=add_do" name="k_form" method="post">
    <table class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
		<thead>
			<tr class="n_bt"><td colspan="2" align="center">内容管理系统</td></tr>
			<tr>
				<th height="28" colspan="2" class="thbt">【<?php echo isset($title)?$title:"";?>】</th>
			</tr></thead>
		<tbody>
			<tr>
				<td width="22%" height="30" align="right">栏目名称：</td>
				<td width="78%"><input name="typename" type="text" class="input400" value="<?php echo isset($oj->typename)?$oj->typename:"";?>" /></td>
			</tr>
			<tr>
				<td width="22%" height="30" align="right">短标题：</td>
				<td width="78%"><input name="shortname" type="text" class="input400" value="<?php echo isset($oj->shortname)?$oj->shortname:"";?>" /></td>
			</tr>

			<tr>
				<td height="30" align="right">所属分类：</td>
				<td><select name="fid" class="input400 selecth" id="fid"><?php echo isset($option_list)?$option_list:"";?></select></td>
			</tr>





			<tr>
				<td height="30" align="right">栏目排序：</td>
				<td><input name="sortrank" type="text" class="input400" value="<?php if($form_action=='add_do'){?>99<?php }else{?><?php echo isset($oj->sortrank)?$oj->sortrank:"";?><?php }?>" /></td>
			</tr>
			
			<tr>
				<td height="30" align="right">跳转URL：</td>
				<td><input name="jumpurl" type="text"  class="input400" value="<?php echo isset($oj->url)?$oj->url:"";?>" /></td>
			</tr>
			<tr>
				<td height="30" align="right">关键词：</td>
				<td><input name="keywords" type="text" class="input400" value="<?php echo isset($oj->keywords)?$oj->keywords:"";?>" /></td>
			</tr>
			<tr>
				<td height="30" align="right">摘要：</td>
				<td><textarea  name="description" rows="5" class="input400 textareah"><?php echo isset($oj->description)?$oj->description:"";?></textarea></td>
			</tr>
			<tr>
				<td height="30" align="right">属性：</td>
				<td>
					<input name="singlepage" type="checkbox" id="danye" value="1" <?php if($oj->singlepage==1){?>checked="checked"  <?php }?>/>  单页
						   <input name="isshow" type="checkbox" id="isshow" value="1" <?php if($oj->isshow==1 || $form_action=='add_do'){?>checked="checked" <?php }?> /> 显示
				</td>
			</tr>
			<tr id="con" >
				<td height="30" align="right">单页内容：</td>
				<td class="pb5"><textarea name="content" cols="95" rows="20" ><?php echo isset($oj->con)?$oj->con:"";?></textarea></td>
			</tr>

			<tr>
				<td align="right">上传缩略图：</td>
				<td>
					<input name="img" type="text" id="img" class="input400" value="<?php echo isset($oj->litpic)?$oj->litpic:"";?>" />
					<span id="faddim" class="button">上传图片</span>
					<span id="list_img"></span>
				</td>
			</tr>
			<tr class="hidden">
				<td height="30" align="right">列表页模板：</td>
				<td>
					<select name="listtpl" class="input400 selecth" id="fid">
						<?php if($form_action=='add_do'){?><option value="newlist.html" selected="selected">newlist.html</option><?php }?>
						<?php if(is_array($arr_file))  foreach($arr_file as $v) { ?>            
						<option value="<?php echo isset($v)?$v:"";?>" <?php if($v==$oj->listtpl){?>selected="selected"<?php }?>><?php echo isset($v)?$v:"";?></option>
						<?php }?>
					</select>
				</td>
			</tr>
			<tr class="hidden">
				<td height="30" align="right">内容页模板：</td>
				<td>
					<select name="viewtpl" class="input400 selecth" id="fid">
						<?php if($form_action=='add_do'){?><option value="new.html" selected="selected">new.html</option><?php }?>
						<?php if(is_array($arr_file))  foreach($arr_file as $v) { ?>            
						<option value="<?php echo isset($v)?$v:"";?>" <?php if($v==$oj->viewtpl){?>selected="selected"<?php }?>><?php echo isset($v)?$v:"";?></option>
						<?php }?>
					</select>
				</td>
			</tr>
			<tr class="hidden">
				<td height="30" align="right">列表页命名规则：</td>
				<td><input name="listrule" type="text" class="input400" value="<?php if($form_action=='add_do'){?>{sitepath}list_{tid}_{page}.html<?php }else{?><?php echo isset($oj->listrule)?$oj->listrule:"";?><?php }?>" /></td>
			</tr>
			<tr class="hidden">
				<td height="30" align="right">内容页命名规则：</td>
				<td><input name="viewrule" type="text" class="input400" value="<?php if($form_action=='add_do'){?>{sitepath}{Y}/{M}{D}/{aid}.html<?php }else{?><?php echo isset($oj->viewrule)?$oj->viewrule:"";?><?php }?>" /></td>
			</tr>
			<tr>
				<td height="40" colspan="2" align="center" >
					<!--<input class="button" name="into" type="button" id="set" value="设置模板" />-->
					&nbsp;&nbsp;&nbsp;&nbsp;
					<input class="button" name="into" type="submit" id="submit" value="<?php echo isset($submit)?$submit:"";?>" />
					<input name="id" type="hidden" value="<?php echo isset($oj->id)?$oj->id:"";?>" />
					<input type="hidden" name="c" value="arctype" />
					<input type="hidden" name="a" value="<?php echo isset($form_action)?$form_action:"";?>" />
				</td>
			</tr>
		</tbody>
    </table>    
</form>